{% extends 'xadmin/base/base.html' %}
{% load static %}

{% block title %}
  用户组管理页
{% endblock %}

{% block header %}
  用户组管理
{% endblock %}

{% block header-option %}
  用户组管理
{% endblock %}


{% block content %}
  <div class="row">
    <div class="col-md-12 col-xs-12 col-sm-12">
      <div class="box box-primary">
        <div class="box-body">
          <table class="table table-bordered table-hover">
            <thead>
            <tr>
              <th>用户组名</th>
              <th>用户数</th>
              <th>操作</th>
            </tr>
            </thead>
            <tbody id="tbody">
            {% for one_group in groups %}
              <tr data-id="{{ one_group.id }}" data-name="{{ one_group.name }}">
                <td>{{ one_group.name }}</td>
                <td>{{ one_group.num_users }}</td>
                <td>
                  <a href="{% url 'x-admin:group-edit' one_group.id %}" class="btn btn-xs btn-warning btn-edit">编辑</a>
                  <button class="btn btn-xs btn-danger btn-del">删除</button>
                </td>
              </tr>
            {% endfor %}


            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
{% endblock %}

{% block script %}
    <script src="{% static 'xadmin/js/group/group_delete.js' %}"></script>
{% endblock %}